home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / re.arc / REPROF.MAC < prev   
Text File  |  1990-01-16  |  6KB  |  123 lines

  1. Ravitz Editor - useful patches and macros
  2.  
  3.   autoscroll cursor with command recall cursor up, down and disable alt-y
  4.   rotating permanent panels
  5.   record and playback keystrokes
  6.   move marked area
  7.   box the perimeter of the area mark
  8.   delete blank lines in the area mark
  9.   load multiple files on startup
  10.  
  11. * autoscroll cursor with command recall cursor up, down and disable alt-y ******
  12.   * This setup sets autoscroll cursor movement for the text area. For the
  13.   * command line the up and down cursor keys recall commands foward and
  14.   * backward. Alt-y is disabled. Use esc to switch the cursor area.
  15.   W @a-y &noop
  16.   W @csrlf &csrlf
  17.   W @csrrt &csrrt
  18.   W @csrup ¯o(10)
  19.   W @csrdn ¯o(11)
  20.   X 10 ^ifcsrcmdln ^recallcmdfor ^ifcsrtxt ^csrup
  21.   X 11 ^ifcsrcmdln ^recallcmdbk  ^ifcsrtxt ^csrdn
  22.  
  23. * rotating permanent panels ****************************************************
  24.   * This  macro rotates between a number of permanent panels and compensates for
  25.   * any size panel. Two numbers need to be set as noted in the comments.
  26.   x *
  27.   y ^inhibitscrn ^savecsrps ^csrcmdln
  28.   y ^varset(1) ^bytepatch @permpanel
  29.   y ^varadd(1) 1
  30.   y ^if<> ^var(1) 9 ^jumpfor(3) ^varset(1) 0     // * 9 is last panel + 1
  31.   y ^if<> ^var(1) 1 ^jumpfor(3) ^varset(1) 3     // * 3 is first panel
  32.   y ^varset(0) ^scrnsplit ^if<>0 ^var(0) ^unsplitscrn
  33.   y ^patchbyte @permpanel ^var(1) ^updatescrninh
  34.   y ^if=0 ^var(0) ^jumpfor(4) ^varadd(0) ^splitscrn(2) ^execfcn
  35.   y ^rescsrps ^updatescrn
  36.  
  37. * record and playback keystrokes ***********************************************
  38.   * These macros lets you record up to 40 keystrokes and play them back by
  39.   * pressing Ctrl-P. Ctrl-R starts and ends the recording. Shift mode r is
  40.   * displayed during recording. If a keystroke invokes a function that gets more
  41.   * keystrokes, then these are not recorded - you can record a key that displays
  42.   * a menu, but the menu selection is not recorded. If one of the keystrokes
  43.   * invokes a macro that turns the display off and assumes it will be turned on
  44.   * when the macro is finished, it will not be turned on when the macro is
  45.   * called from a macro. This may give unexpected results.
  46.   m 46 ^error Keystroke limit exceeded
  47.   w @c-r ¯o(1)
  48.   w @c-p ¯o(2)
  49.   x 1
  50.   y ^varset(1) ^@mac 2 ^varset(2) ^var(1) ^varadd(2) 80 ^setshiftmd(18)
  51.   y ^label(1)
  52.   y ^if< ^var(1) ^var(2) ^jumpfor(3) ^setshiftmd(0) &dispmsg(46)
  53.   y ^getkeyns
  54.   y ^if<> ^var(0) ^macro(*) ^jumpfor(3) ^setshiftmd(0) ^endmacro
  55.   y ^patchwords(2) ^var(1) ^var(0) ^endmacro ^varadd(1) 2
  56.   y ^execfcn
  57.   y ^jumpbklb(1)
  58.   X 2
  59.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  60.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  61.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  62.   Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
  63.  
  64. * move marked area *************************************************************
  65.   * This macro moves the area mark with its contents to the cursor location. The
  66.   * cursor may be anywhere except the command line. The are you sure prompt for
  67.   * data lost past column 255 is not given. Ignore excluded lines mode is
  68.   * respected. The area mark is buffered in a temporary file, so more space is
  69.   * needed than for a normal overlay.
  70.   x *
  71.   y ^savecsrps
  72.   y ^if= ^armkmd ^sp &dispmsg(12) ^ifcsrcmdln &dispmsg(16)
  73.   y ^ifnoteditable &dispmsg(16)
  74.   y ^inhibitscrn
  75.   y ^varset(15) ^bytepatch @edcurfl ^patchbyte @edcurfl ^no
  76.   y ^csrcmdln ^eraseendln e ^execcmdnorecall
  77.   y ^patchbyte @edcurfl ^var(15)
  78.   y ^ifnotsuccess ^jumpforlb(2)
  79.   y ^csrtxt ^resexmd ^overlayar ^ifnotsuccess ^jumpforlb(1)
  80.   y ^resexmd ^blankarnsc ^movearmk
  81.   y ^prevses ^csrtxt ^suppressays &overlayar ^movearmk
  82.   y ^nextses ^csrcmdln q ^suppressays ^execcmdnorecall ^endmacro
  83.   y ^label(1) ^csrcmdln q ^suppressays ^execcmdnorecall ^csrtxt &dispmsg(5)
  84.   y ^label(2) ^eraseendln ^csrtxt &dispmsg(5)
  85.  
  86. * box the perimeter of the area mark *******************************************
  87.   x *
  88.   y ^if= ^armkmd ^sp &dispmsg(12) ^if<> ^armknotonscrn 0 &dispmsg(18) ^gotoarmk
  89.   y ^setdrawingmdsl ^if= ^curcol ^armkcol2 ^jumpfor(4) ^keyfcn @csrrt ^jumpbk(6)
  90.   y ^keyfcn @csrdn ^if<> ^inarmk 0 ^jumpbk(5) ^setdrawingmdoff ^csrup
  91.   y ^setdrawingmdsl ^if= ^curcol ^armkcol1 ^jumpfor(4) ^keyfcn @csrlf ^jumpbk(6)
  92.   y ^keyfcn @csrup ^if<> ^inarmk 0 ^jumpbk(5) ^setdrawingmdoff ^csrdn
  93.   y ^if= ^curcol ^armkcol2 ^endmacro // * this is for one column wide marks
  94.   y ^setdrawingmdsl ^keyfcn @csrrt ^setdrawingmdoff ^csrlf(1) ^csrcmdln ^csrtxt
  95.  
  96. * delete blank lines in the area mark ******************************************
  97.   x *
  98.   y ^if= ^armkmd ^sp &dispmsg(12) ^if<> ^armknotonscrn 0 &dispmsg(18) ^gotoarmk
  99.   y ^label(1)
  100.   y ^if<> ^currow ^scrnheight ^jumpfor(2) ^scrolldn1pg
  101.   y ^if=0 ^inarmk ^endmacro
  102.   y ^iflnexcluded ^reshow
  103.   y ^iflnnotblank ^jumpfor(3)
  104.   y ^delln ^jumpbklb(1) ^csrdn ^jumpbklb(1)
  105.  
  106. * load multiple files on startup ***********************************************
  107.   * This is a startup macro that loads multiple files into RE from the command
  108.   * line. It is not perfect, but should work in most cases.
  109.   m 46 ^error Files not loaded
  110.   x 0
  111.   y ^if<> ^msgnum 29 ^endmacro ^csrlf ^inhibitscrn
  112.   y ^csrtxt ^overlaycmd ^delchar(2) ^mkln ^flowlist ^topoffile ^varset(0) 0
  113.   y ^label(1)
  114.   y   ^iflntopbot ^jumpforlb(2)
  115.   y   ^setpsmk ^wordcmdln ^csrcmdln ^insmd e ^sp ^updatescrn ^inhibitscrn
  116.   y   ^gotopsmk ^prevses ^execcmd
  117.   y   ^ifsuccess ^jumpfor(6) ^gotopsmk ^csrdn ^varset(0) 1 ^jumpbklb(1)
  118.   y   ^gotopsmk ^gotopsmk ^delln ^jumpbklb(1)
  119.   y ^label(2)
  120.   y ^unsetpsmk ^csrcmdln ^blankln ^csrstartln ^clrchgd
  121.   y ^if= ^var(0) 1 ^jumpfor(5) q ^execcmdnorecall ^nextses ^endmacro
  122.   y ^dispmsg(46)
  123.